Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make RepositoryEntityMultipartHttpMessageConverter resolve json HttpMessageConverter when it is being used. #2189

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vierbergenlars
Copy link
Contributor

In spring-data-rest 4.3.5 (spring boot 3.3.5), the logic has changed and now the entity
class is being passed to canRead() and read() instead of
PersistentEntityResource.

This means that a different converter can be triggered based on which
entity is being passed, so we need to select the correct HttpMessageConverter
at the point when we know the class that is being read.
This also allows users to configure their own specific
HttpMessageConverters for their entities.

…essageConverter when it is being used.

In spring-data-rest 4.3.5, the logic has changed and now the entity
class is being passed to `canRead()` and `read()` instead of
`PersistentEntityResource`.

This means that a different converter can be triggered based on which
entity is being passed, so we need to select the correct HttpMessageConverter
at the point when we know the class that is being read.
This also allows users to configure their own specific
HttpMessageConverters for their entities.
@vierbergenlars
Copy link
Contributor Author

There is another problem introduced in that version of spring-data-rest (spring-projects/spring-data-rest#2425), which may make the tests fail anyways on spring boot 3.3.5.

I already wanted to get this PR opened because I had to fix this issue anyways during my investigation into why our contentgrid-spring tests were failing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant